pkgname=ndctl
pkgver=git
pkgrel=1
arch=('i386' 'x86_64')
url="https://github.com/pmem/ndctl"
license=('GPL')
makedepends_debian_11=(pkg-config libkmod-dev uuid-dev libjson-c-dev udev libudev-dev libudev1 bash-completion libkeyutils-dev meson asciidoctor libiniparser-dev)
source=("https://github.com/pmem/ndctl.git")
md5sums=('SKIP')

build() {
	cd "$srcdir/${pkgname}"
	[[ -e '/usr/include/iniparser.h' ]] || cp /usr/include/iniparser/* /usr/include/
	meson setup build
	meson configure -Dtest=enabled -Ddocs=disabled -Drootprefix=/lkp/benchmarks -Dprefix=/lkp/benchmarks build
	meson compile -C build
}

package() {
	cd "$srcdir/${pkgname}"
	DESTDIR="${pkgdir}" meson install -C build
}
